package com.lukebang.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.lukebang.pojo.Territory;

/**
 * 
 * TerritoryDAO 上午11:13:14
 * 
 * Copyright zhaocj Inc. All rights reserved. Love ME Like Justin Bieber.
 */

public interface TerritoryDAO {
	// 查询已经开通的省份的CODE
	List<String> selectAvailableProvinceCodeByWorker();

	List<Territory> selectAvailableProvinceByCode(@Param("codes") List<String> codeByWorker);

	List<String> selectAvailableCityCodeByProvince(String provinceCode);

	List<Territory> selectAvailableCitesByCode(@Param("codes") List<String> cityCodes);

	Territory selectTerritoryPriceByCity(@Param("codeStr") String codeStr, @Param("type") Integer type);

	List<Territory> selectAvailableCountryByCity(String cityCode);

	// 根据省份城市区域CODE转化为 省份名字城市名字和区域名字已List返回
	List<String> selectForConvertCodeToAreaName(@Param("provinceCode") String provinceCode,
			@Param("cityCode") String cityCode, @Param("countryCode") String countryCode);

	String selectCodeByName(String areaName);

	// 查询所有的省份
	public List<Territory> selectAllProvince(Integer level);

	// 查询所有的市
	public List<Territory> selectAllCity(String parentId);

	// 查询所有的县
	public List<Territory> findAllCountry(String code);
	public Integer selectCountByName(String name);
	//查询所选区域覆盖的师父的个数
	public Integer selectCountWorkerByName(String name);
}
